﻿using System.Web.Mvc;

namespace Ams.Mvc.Bootstrap.Annotations
{
    public static class DataAnnotationValidations
    {
        public static void Register()
        {
            ModelMetadataProviders.Current = new BootstrapModelMetadataProvider();
            DataAnnotationsModelValidatorProvider.RegisterAdapter(typeof(PostalCodeAttribute), typeof(RegExValidator<PostalCodeAttribute>));
            DataAnnotationsModelValidatorProvider.RegisterAdapter(typeof(ReqAttribute), typeof(RequiredValidator<ReqAttribute>));
        }
    }
}
